home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / dvmu12.arc / DVAPMENU.DOC next >
Text File  |  1989-05-26  |  11KB  |  251 lines

  1.  
  2.  
  3.                    DESQview Application Program Menu 
  4.  
  5.                           Gregory Stewart 
  6.  
  7.                           May 26, 1989 
  8.                            Version 1.2 
  9.  
  10.  
  11.  
  12. The DESQview Application Program Menu program (DVAPMENU) provides 
  13. nested menu support for the DESQview environment.  It is invoked from 
  14. the DESQview Open Window menu, reads a menu definition file and 
  15. displays a program selection menu which looks very much like the 
  16. DESQview Open Window menu.  Programs are started from this panel by 
  17. selecting them via mouse or keyboard in the same manner as from the 
  18. Open Window menu. 
  19.  
  20.  
  21. CHANGE HISTORY:
  22.  
  23. 04/11/89 GGS: Version 1.0
  24.  
  25. 04/19/89 GGS: Version 1.1
  26.               Use window start row/col from DVP file to position menu
  27.               Prompt for application parameters via sub-window
  28.  
  29. 05/26/89 GGS: Version 1.2
  30.               Change parm window to return to sub-menu when ESC pressed
  31.               Disallow resizing window
  32.               Display version number before displaying menu
  33.               Allow specification of prompt text for parameter prompting
  34.               Raise limit for menu items from 10 to 20
  35.               Allow specification of foreground and background colors
  36.  
  37.  
  38. INSTALLING THE DEMONSTRATION PROGRAMS: 
  39.  
  40. The DVAPMENU package consists of this documentation, the menu program 
  41. DVAPMENU.EXE, a sample menu definition file EXAMPLES.MDF, example 
  42. programs, and DESQview Program Information Files (DVPs) for the menu 
  43. program and the example programs. 
  44.  
  45. To install and run the examples, put all of the files into a directory 
  46. on your hard drive.  Then run Add a Program from the DESQview Open 
  47. Window menu.  When Add a Program comes up, select "Other" from the top 
  48. of the menu.  Specify the drive and subdirectory into which you copied 
  49. the files.  Add a Program should find the EX-PIF.DVP file in the 
  50. directory and will display "DVAPMENU Examples" as a selectable program 
  51. to Add.  Select the program, hit the Enter key to add it and keep 
  52. hitting Enter until the item is added to your menu. Then you may run 
  53. DVAPMENU Examples as you would any other installed program. 
  54.  
  55.  
  56.  
  57. CREATING A DVAPMENU MENU DEFINITION FILE 
  58.  
  59. The menu definition file (MDF) is a text file that defines the 
  60. application menu. It contains two types of statements, and each 
  61. statement can contain one or more keywords and keyword values. An 
  62. example of a MDF, illustrating all of the supported keywords, is shown 
  63. below: 
  64.  
  65.   { DESQview Data Base sub-menu } 
  66.   :Menu       title='Data base' 
  67.               autoend=y                 { exit after selection } 
  68.               winpos=dvp                { position according to DVP } 
  69. |             forcolor=white
  70. |             bkgcolor=blue
  71.   :Item id=C9 desc='1989 checkbook' 
  72.               dvp=c:\dv\pcfdb.dvp 
  73.               path=d:\pcfdb  
  74.               parm=/drive,c,/file,cb89,/path,\data\cb89 
  75.   :Item id=B9 desc='1989 budget'    
  76.               dvp=c:\dv\budg89.dvp 
  77.               path=d:\pcfdb  
  78.               parm=/drive,c,/file,bu89,/path,\data\cb89 
  79.   :Item id=AD desc='Name & address' 
  80.               dvp=c:\dv\address.dvp 
  81.   :Item id=DB desc='Other data bases' 
  82.               dvp=c:\dv\pcfdb.dvp 
  83.               path=d:\pcfdb
  84. |             parmprompt='What data base do you want to work with?'
  85.               parm=?                    { prompt for parameters } 
  86.  
  87. The first line is a comment. Comments can appear anywhere, and are 
  88. enclosed in brackets. 
  89.  
  90. The second line starts the menu definition. The :MENU tag must be the 
  91. first tag in the file. It contains five parameters, TITLE, AUTOEND, 
  92. WINPOS, FORCOLOR, and BKGCOLOR.
  93.  
  94. The TITLE parameter specifies the title that goes at the top of the 
  95. menu. If the title contains a blank, it must be enclosed in single 
  96. quotes. 
  97.  
  98. The AUTOEND parameter indicates whether the menu program should end 
  99. after initiating a selected program. If it is not automatically ended, 
  100. then either the ESC key or mouse button 2 can be used to end it. 
  101.  
  102. The WINPOS parameter indicates that the Starting Row and Starting 
  103. Column parameters in the DESQview program information file (DVP) 
  104. should be used to position the application menu on the screen. If this 
  105. paramter is omitted, the application menu is positioned in the upper 
  106. right hand corner of the screen. 
  107.  
  108. | The FORCOLOR and BKGCOLOR parameters specify the menu's foreground and 
  109. | background colors, respectively. The colors that can be specified for 
  110. | FORCOLOR are black, blue, green, cyan, red, magenta, brown, lightgrey, 
  111. | darkgrey, lightblue, lightgreen, lightcyan, lightred, lightmagenta, yellow, 
  112. | and White. The colors that can be specified for BKGCOLOR are black, blue, 
  113. | green, cyan, red, magenta, brown, and lightgrey. If either of these 
  114. | parameters are specified, they must both be specified. You must also change 
  115. | the DVP file for the menu program to indicate that it uses its own colors. 
  116.  
  117. The :ITEM tag defines an application entry on the menu. There may be 
  118. up to twenty :ITEM tags per MDF. Valid parameters are ID, DESC, DVP, 
  119. PATH, PARM, and PARMPROMPT.
  120.  
  121. The ID parameter defines a two-keystroke sequence used to select the 
  122. application from the menu. An application may also be selected by 
  123. mouse button 1. 
  124.  
  125. The DESC parameter specifies an application description that goes on 
  126. the menu. If the description contains a blank, it must be enclosed in 
  127. single quotes. 
  128.  
  129. the DVP parameter specifies the file name of the DESQview Program 
  130. Information File. If the DVP files are not in DVAPMENU's current 
  131. directory, then the file names must contain the pathname as specified 
  132. above. Refer to 'Creating a DVP file' below for additional 
  133. information. 
  134.  
  135. The PATH parameter specifies the directory that is to be made current 
  136. when the application program is started. There are three ways to set 
  137. the application's current directory: if the DIRECTORY field in the DVP 
  138. is not blank (contains a directory specification), the application 
  139. starts in the PIF-specified directory; if the DIRECTORY field in the 
  140. DVP is blank, and the PATH parameter is specified, the application 
  141. starts in the directory indicated by the PATH parameter; if the 
  142. DIRECTORY field in the DVP is blank, and the PATH parameter is NOT 
  143. specified, the application is started in DVAPMENU's current directory. 
  144.  
  145. The PARM parameter specifies the parameters that are to be passed to 
  146. the application program. In order for these parameters to be passed to 
  147. the application program, the PARAMETERS field in the DVP must contain 
  148. the single character '?'. If the PARAMETERS field in the DVP does NOT 
  149. contain the single character '?', then the application will receive 
  150. the parameters specified in the DVP. 
  151.  
  152. The parameters can be directly specified on the PARM parameter, or 
  153. they can be prompted for in a pop-up window. If the parameters 
  154. specified on the PARM parameter contain a blank, they must be enclosed 
  155. in single quotes.  If the PARM parameter in the MDF contains a single 
  156. '?', then a pop-up window is provided for you to type the parameters 
  157. to be passed to the program. 
  158.  
  159. | The PARMPROMPT parameter can be used to specify a prompt string for the
  160. | pop-up window. The parameter prompt should be enclosed in single quotes.
  161.  
  162. CREATING A DESQVIEW PROGRAM INFORMATION FILE: 
  163.  
  164. If you want to use DVAPMENU for nested menus, then you probably don't 
  165. want the applications to appear on the DESQview Open Window menu. To 
  166. do this, you must perform the following steps: 
  167.  
  168. 1) ADD the application program to the DESQview Open Window menu via 
  169.    the DESQview Add a Program (AP) function. 
  170.  
  171. 2) COPY the xx-PIF.DVP file created by Add a Program to another file. 
  172.    If you don't want it to appear on the Add a Program panel, call it 
  173.    something other than xx-PIF.DVP. In the demonstration above, only 
  174.    DVAPMENU Examples appears on the Add a Program display, because 
  175.    only its DVP has a name of the form EX-PIF.DVP. 
  176.  
  177. 3) DELETE the application program from the DESQview Open Window menu 
  178.    via the DESQview Delete a Program (DP) function. 
  179.  
  180. A word of caution: make sure you have the DVP set up the way you want 
  181. it before deleting it from the DESQview Open Window menu. The DESQview 
  182. Change a Program (CP) function appears to only work on programs on the 
  183. Open Window menu, and it is a cumbersome procedure to get it back on 
  184. the menu. However, it can be done. You have to rename the DVP file to 
  185. a name of the form xx-PIF.DVP, use Add a Program (AP) to add it back 
  186. to the Open Window menu, change it via Change a Program (CP), then go 
  187. through steps 2 and 3 above to get it off the menu again. 
  188.  
  189.  
  190.  
  191. ADDING NESTED MENUS TO THE DESQVIEW OPEN WINDOW MENU 
  192.  
  193. The easiest way that I have found to add nested menus to the Open 
  194. Window menu is to use Change a Program on an existing nested menu 
  195. entry, change the KEYS USED TO OPEN MENU field, and change the 
  196. PARAMETERS field to point it to a different Menu Definition file. If 
  197. you installed the demonstration programs above, you can use Change a 
  198. Program on the EX entry. 
  199.  
  200. Here's the complete information that goes in to the Program 
  201. Information File for DVAPMENU. This example is for the DATABASES 
  202. nested menu used in the Menu Definition File example above: 
  203.  
  204.                                Change a Program
  205.  
  206.  Program Name............: >Data base menu
  207.  
  208.  Keys to Use on Open Menu: DB                      Memory Size (in K):  32
  209.  
  210.  Program...: c:\dv\dvapmenu.exe
  211.  
  212.  Parameters: c:\dv\database.mdf
  213.  
  214.  Directory.:
  215.  
  216.  Options:
  217.                   Writes text directly to screen.......: [N]
  218.                   Displays graphics information........: [N]
  219.                   Virtualize text/graphics (Y,N,T).....: [N]
  220.                   Uses serial ports (Y,N,1,2)..........: [N]
  221.                   Requires floppy diskette.............: [N]
  222.  
  223.  
  224.  
  225.                       Change a Program Advanced Options
  226.  
  227.  System Memory (in K).......:   1   Maximum Program Memory Size (in K)..:
  228.  
  229.  Script Buffer Size.......:     0   Maximum Expanded Memory Size (in K):
  230.  
  231.  Text Pages: 1  Graphics Pages: 0   Initial Mode:        Interrupts:    to
  232.  
  233.  Window Position:
  234.     Maximum Height:  25       Starting Height:   1       Starting Row...:   0
  235.     Maximum Width.:  80       Starting Width.:   20      Starting Column:   0
  236.  
  237.                                 Shared Program
  238.  Pathname..:
  239.  Data......:
  240.  
  241.  Close on exit (Y,N,blank)......: [Y]  Uses its own colors..............: [N]
  242.  Allow Close Window command.....: [Y]  Runs in background (Y,N,blank)...: [Y]
  243.  Uses math coprocessor..........: [N]  Keyboard conflict (0-4)..........: [0]
  244.  Share CPU when foreground......: [Y]  Share EGA when foreground/zoomed.: [Y]
  245.  Can be swapped out (Y,N,blank).: [ ]  Protection level (0-3)...........: [0]
  246.  
  247.  
  248. | Note: 'Uses its own colors' must be set to [Y] if the FORCOLOR and BKGCOLOR 
  249. | parameters are used.
  250.  
  251.